Skip to content

Add demo for JEP 334 - JVM Constants API (Java 12)#319

Merged
AloisSeckar merged 1 commit intoAloisSeckar:masterfrom
Abhineshhh:feat/jep-334-constants-api
Oct 27, 2025
Merged

Add demo for JEP 334 - JVM Constants API (Java 12)#319
AloisSeckar merged 1 commit intoAloisSeckar:masterfrom
Abhineshhh:feat/jep-334-constants-api

Conversation

@Abhineshhh
Copy link
Contributor

Description

Implements demo for JEP 334 - JVM Constants API introduced in Java 12.

Closes #317

Changes

  • Created ConstantsAPIDemo.java demonstrating the java.lang.constant API
  • Added JDK12Info.json with metadata for Java 12 JEPs
  • Updated Java12DemoLoader.java to register the new demo

Demo Features

The demo showcases:

  1. ClassDesc - Nominal descriptors for class types (primitives, references, arrays)
  2. MethodTypeDesc - Method signatures and type modifications
  3. MethodHandleDesc - Static and virtual method handle descriptors
  4. DynamicConstantDesc - Bootstrap methods and dynamic constants

Checklist

  • Follows package structure: org.javademos.java12.jep334
  • Implements IDemo interface with proper info() and run() methods
  • Uses Markdown-style documentation (///)
  • Added JSON entry to JDK12Info.json
  • Registered in Java12DemoLoader.java using JEP number as key
  • Includes @author attribution
  • Working code examples covering all major APIs

@AloisSeckar AloisSeckar added the hacktoberfest Counts as submission for Hacktoberfest 2025 label Oct 27, 2025
@AloisSeckar AloisSeckar merged commit cf3abee into AloisSeckar:master Oct 27, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest Counts as submission for Hacktoberfest 2025

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JEP 334 – JVM Constants API

2 participants